<template>
    <div>
        <h3>科室显示</h3>
        科室名称
        <input type="text" v-model="brr.Name" />
        <input type="button" value="查询" @click="Show" class="btn btn-info" />
        <table class="table table-bordered">
            <tbody>
                <tr>
                    <td>科室名称</td>
                    <td>科室照片</td>
                    <td>成立日期</td>
                </tr>
                <tr v-for="item in arr" :key="item.keShiId">
                    <td>{{ item.keShiName }}</td>
                    <td><img :src="item.keShiImg" width="100" height="100" /></td>
                    <td>{{ item.keShiTime.substring(0, 10) }}</td>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import { reactive, ref, onMounted } from 'vue';
import axios from 'axios';
import { useRoute, useRouter } from 'vue-router';

let arr: any = ref([])
onMounted(() => {
    Show();
})

let brr: any = ref({
    Name: ""
})

const Show = () => {
    console.log(brr.value);

    axios({
        url: "/api/KeShi/KeShiShow",
        method: "get",
        params: brr.value
    })
        .then(res => {
            arr.value = res.data;
        })
        .catch(err => {

        })


}




</script>

<style scoped></style>